<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件监听</title>


</head>
<body>

<button id="button1">按钮</button>



<script>
    var btn = document.getElementById("button1")

    btn.addEventListener("click", function () {
        console.log("单击了－－－－－")
    })

    btn.addEventListener("dbclick", dbclick)


    function dbclick() {
        alert("双击了")
    }


</script>
</body>
</html>